define(function(require, exports, module) {
    var oShowIntroBtn = $('.js_showIntro');
    var oGiftIntroShow = $('.js_giftIntroShow');
    var oCloseBtn = $('.js_closeBtn_gift');
    var oGiftImg = oGiftIntroShow.find('.js_giftImg');

    //广告轮播
    var oSilderImg = $('.js_silderImg_gift');        //广告轮播框
    var indexSwiper = null;
    oShowIntroBtn.on('click', function (e) {
        oGiftImg.each(function (i) {
            oGiftImg.eq(i).attr('src', oGiftImg.eq(i).attr('gift-src'))
        });
        oGiftIntroShow.show().stop().animate({
            'bottom': 0
        }, 250);
        e.stopPropagation();
    });

    oCloseBtn.on('click', function (e) {
        // oGiftIntroShow.hide();
        oGiftIntroShow.stop().animate({
            'bottom': '-100%'
        }, 250, function () {
            $(this).hide();
        });
        e.stopPropagation();
    });


    SwiperCoverflow();

    function SwiperCoverflow() {
        indexSwiper = oSilderImg.swiper({
            pagination: null,
            observer: true,
            observeParents: true,
            effect : 'coverflow',
            slidesPerView: 1.35,
            centeredSlides: true,
            coverflow: {
                rotate: -25,
                stretch: 0,
                depth: 100,
                modifier: 1,
                slideShadows : false
            }
        });
    }
})